﻿using System;

namespace Garfield.Core.Runtime.SPI
{
    public interface IPlatformProvider
    {
        void RegisterExtensionPoint(Plugin.ExtensionPoint point);
        void RegisterExtension(string extensionPointIdentifier, object identifier, object instance);
        void RegisterExtension(string extensionPointIdentifier, object identifier, Type implementation, Delegate initializer);
        object GetService(Type api);
        object GetExtensions(string extensionPointIdentifier);
        
    }

    public class ExtensionPointException : Exception
    {
        public ExtensionPointException(string message) : base(message)
        {
        }

        public ExtensionPointException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
}
